beginoutdoorscript;

variables;
short pcs,bmessage,flight_amt;

body;

beginstate 0;

	if(get_flag(13,1) == 0)
		set_incidental_sound(1);
	else
		set_incidental_sound(0);

	if(get_flag(13,1) == 2){
		reset_dialog();
		if(party_size() == 1)
			add_dialog_str(0,"Whew-- that was surprisingly devious.  Not that I should have expected any less from the Empire's finest, but fighting them is always a lesson in tenacity.",0);
		if(party_size() > 1)
			add_dialog_str(0,"Whew-- that was surprisingly devious.  Not that we should have expected any less from the Empire's finest, but fighting them is always a lesson in tenacity.",0);
		add_dialog_str(1,"Who was that man in red, though?  He didn't seem brainwashed, and he also wasn't as crazed and ambitious as The Immortal.  Is he one of The Immortal's lackeys?",0);
		add_dialog_choice(0,"Ghh...  maybe.");
		bmessage = run_dialog(1);

		play_sound(95);
		reset_dialog();
		add_dialog_str(0,"That mental presence...  It's Katothen again.",0);
		add_dialog_str(1,"_I see you made it to the other side.  I'm trying to watch your progress, but the magical shielding around you right now makes this difficult._",0);
		add_dialog_str(2,"_Unless I'm mistaken, you met up with another rakshasa, but he or she retreated quickly.  Like The Immortal, this one was especially blurry to my scrying, so I couldn't read it._",0);
		add_dialog_str(3,"...that was another rakshasa?",0);
		add_dialog_str(4,"_Anyway, I'm glad you made it out safely.  You're very close to the main outpost-- just follow the road.  I don't know what you'll find there, but whatever you do find, your job is clear._",0);
		add_dialog_str(5,"_Kill The Immortal.  Kill Rufus Rothgard.  He is the one in charge of this operation.  You've done well so far; keep it up.  Oh, and good luck._",0);
		add_dialog_choice(0,"Yeah, thanks...");
		bmessage = run_dialog(1);

		toggle_quest(3,0);
		toggle_quest(4,1);
		award_party_xp(500,25);
	}

break;

beginstate 1;
break;

beginstate START_STATE;

	pcs = 0;
	while(pcs <= 3){
		flight_amt = get_char_status(pcs,25);
		if(flight_amt > 0){
			flight_amt = (flight_amt * -1);

			set_char_status(pcs,25,flight_amt,1,0);
		}

		pcs = (pcs + 1);
	}

break;

beginstate 10;

	if(get_flag(79,0) == 0){
		reset_dialog();
		add_dialog_str(0,"...WOW.  These caves are large enough to have their own tributary!  Not a small one, either.  The river here is not only large enough to inhibit traffic, but large enough to use boats to navigate.",0);
		add_dialog_str(1,"More to the point, there seems to be a pier in the distance, marked by flickering lights.  Is it possible that the brigands here actually use these rivers as a way to transport men and goods?",0);
		if(party_size() == 1)
			add_dialog_str(2,"That means that there are docks on this side of the river!  Perhaps I could get a boat.  Or maybe not, who knows.",0);
		if(party_size() > 1)
			add_dialog_str(2,"That means that there are docks on this side of the river!  Perhaps we could get a boat.  Or maybe not, who knows.",0);
		add_dialog_choice(0,"Who knows.");
		bmessage = run_dialog(1);
		set_flag(79,0,1);
	}

break;

beginstate 11;

	if(get_flag(81,0) == 0){
		if(party_size() == 1)
			message_dialog("This river seems difficult to ford, but much to my surprise, there is a series of stepping stones that make crossing the river from this side of the shore to the other manageable.","");
		if(party_size() > 1)
			message_dialog("This river seems difficult to ford, but much to our surprise, there is a series of stepping stones that make crossing the river from this side of the shore to the other manageable.","");
		set_flag(81,0,1);
	}

break;

beginstate 12;

	if(get_flag(82,0) == 0){
		message_dialog("The caves are usually nice and cool.  In this portion, however, that is rapidly becoming less and less the case.","Whatever is ahead, it is bound to be less than pleasant.");
		set_flag(82,0,1);
	}

break;

beginstate 13;

	if(get_flag(82,0) == 1){
		reset_dialog();
		add_dialog_str(0,"WOW.  If Katothen was to paint a picture of his _nexus_, it could not get much clearer than this.",0);
		add_dialog_str(1,"There is a giant, lava-spewing fumarole here with a fragile-looking bridge of basalt creeping towards a cliffside.  Steam rises up from the lava, and the air is barely breathable.",0);
		add_dialog_str(2,"There are two gigantic, glowing balls of energy suspended by metal columns standing outside of a shining, blue barrier.  Clearly, SOMETHING here is being protected.",0);
		add_dialog_str(3,"Whatever it is, it both feels and looks dangerous.  This may not be the safest place to be.",0);
		add_dialog_choice(0,"Impressive.");
		bmessage = run_dialog(1);
		set_flag(82,0,2);
	}

break;

beginstate 14;

	play_sound(169);
	play_sound(11);
	if(party_size() == 1)
		message_dialog("As soon as I get close to these runes, they instantly turn red and begin spewing out pyroclasmic waste all over with torrential winds pushing me back.  Going closer would risk hurling me into the lava, nevermind getting my skin burned off.","This may not be a direction I would like to continue in.");
	if(party_size() > 1)
		message_dialog("As soon as we get close to these runes, they instantly turn red and begin spewing out pyroclasmic waste all over with torrential winds pushing us back.  Going closer would risk hurling us into the lava, nevermind getting our skin burned off.","This may not be a direction we would like to continue in.");
	block_entry(1);

break;

beginstate 15;

	if(get_flag(83,0) == 0){
		reset_dialog();
		if(party_size() == 1){
			add_dialog_str(0,"A-ha!  I was right-- they DO have a fort, and lo and behold, here it is.",0);
			add_dialog_str(1,"It appears to be quite small.  I might be able to take it.  At least, given my success thus far, I might be able to.   On the other hand, one thing DOES worry me a little.",0);
			add_dialog_str(2,"I'm not intimately familiar with typical engineering and architecture practices, but this fort seems far too utilitarian to be the work of brigands.  It looks less like a brigand fortification, and more like a fort, period.",0);
			add_dialog_str(3,"Ah well, it looks like I have no choice but to charge the ten-meter walls and find out what seems so unusual about this fort when I'm inside of it.",0);
		}
		if(party_size() > 1){
			add_dialog_str(0,"A-ha!  We were right-- they DO have a fort, and lo and behold, here it is.",0);
			add_dialog_str(1,"It appears to be quite small.  We might be able to take it.  At least, given our success thus far, we might be able to.   On the other hand, one thing DOES worry us a little.",0);
			add_dialog_str(2,"We're not intimately familiar with typical engineering and architecture practices, but this fort seems far too utilitarian to be the work of brigands.  It looks less like a brigand fortification, and more like a fort, period.",0);
			add_dialog_str(3,"Ah well, it looks like we have no choice but to charge the ten-meter walls and find out what seems so unusual about this fort when we're inside of it.",0);
		}
		add_dialog_choice(0,"Charge!");
		bmessage = run_dialog(1);
		set_flag(83,0,1);
	}

break;

beginstate 16;

	if((get_flag(83,0) >= 2) && (get_flag(83,0) < 10)){
		if(party_size() == 1)
			message_dialog("...Katothen is probably right.  The Immortal didn't kill me the last time we fought, but if I let him have the home field advantage and men at his disposal, things might not turn out so cleanly.","The wise choice in this instance may just be to back off.");
		if(party_size() > 1)
			message_dialog("...Katothen is probably right.  The Immortal didn't kill us the last time we fought, but if we let him have the home field advantage and men at his disposal, things might not turn out so cleanly.","The wise choice in this instance may just be to back off.");
		block_entry(1);
	}
	if(get_flag(83,0) == 1){
		play_sound(95);
		reset_dialog();
		if(party_size() == 1)
			add_dialog_str(0,"The voice in my head...  It's him again.",0);
		if(party_size() > 1)
			add_dialog_str(0,"The voice in our heads...  It's him again.",0);
		add_dialog_str(1,"_Hello.  It's Katothen.  Yes, I had seen you fighting against 'The Immortal'.  I am impressed, but hold off on charging him for now._",0);
		add_dialog_str(2,"_The brigands here should be within your reach...  but 'The Immortal' is waiting in that fort for you.  He and his men, with the home field advantage in a bottleneck, are too much for you to handle._",0);
		if(get_flag(72,0) == 0)
			add_dialog_str(3,"_In the meantime, the situation has changed, and I am going to want to see you personally again.  The woman who stumbled in as you were leaving has shed some light on the situation._",0);
		if(get_flag(72,0) == 1)
			add_dialog_str(3,"_In the meantime, the situation has changed, and I am going to want to see you personally again.  Hunter, whom I hear you spoke with briefly, has shed some light on the situation._",0);
		if((get_flag(72,0) >= 2) && (get_flag(72,0) <= 4))
			add_dialog_str(3,"_In the meantime, the situation has changed, and I am going to want to see you personally again.  Hunter has shed some light on the situation._",0);
		if(get_flag(72,0) >= 5)
			add_dialog_str(3,"_In the meantime, the situation has changed, and I am going to want to see you personally again.  Hunter has told me what she told you, and she and I have been coming to some disturbing conclusions._",0);
		add_dialog_str(4,"_From where you are now, head east and follow the only path you can.  I will contact you when you get close.  Again, I have already arranged for your arrival._",0);
		add_dialog_choice(0,"Okay then.");
		bmessage = run_dialog(1);

		block_entry(1);
		set_flag(83,0,2);
	}

break;

beginstate 17;

	if(get_flag(83,0) == 2){
		play_sound(95);
		message_dialog("_That's far enough.  From where you are now, head directly west._","");
		set_flag(83,0,3);
	}

break;

beginstate 18;

	if(get_flag(83,0) < 3){
		block_entry(1);
		end();
	}
	if(get_flag(83,0) == 3){
		if(party_size() == 1)
			message_dialog("It's another secret passage, like the one Katothen showed to me to get me to see him in Sanctuary before.","I shouldn't be getting used to seeing magic used so flagrantly, but considering what else I've been forced to accept lately, a small illusion in a cave wall isn't worth mentioning, even if I myself can't do such a feat.");
		if(party_size() > 1)
			message_dialog("It's another secret passage, like the one Katothen showed to us to get me to see him in Sanctuary before.","We shouldn't be getting used to seeing magic used so flagrantly, but considering what else we've been forced to accept lately, a small illusion in a cave wall isn't worth mentioning, even if we can't do such a feat.");
		set_flag(83,0,4);
	}

break;

beginstate 19;

	if(get_flag(15,1) == 0){
		reset_dialog();
		add_dialog_str(0,"THIS must be the 'Red Fortress'.",0);
		if(party_size() == 1){
			add_dialog_str(1,"It's huge!  Captain Andre was not exaggerating.  It's easily one of the biggest Imperial installations I've ever seen.  It's imposing and dark, with a red hue earning its forboding name.",0);
			add_dialog_str(2,"Fortunately, it appears to be unguarded.  Rothgard must have underestimated me.  Or perhaps he's inviting me.  Or even more probable is that there should be no need for heavy fortifications on a fortress that shouldn't even be here.",0);
		}
		if(party_size() > 1){
			add_dialog_str(1,"It's huge!  Captain Andre was not exaggerating.  It's easily one of the biggest Imperial installations we've ever seen.  It's imposing and dark, with a red hue earning its forboding name.",0);
			add_dialog_str(2,"Fortunately, it appears to be unguarded.  Rothgard must have underestimated us.  Or perhaps he's inviting us.  Or even more probable is that there should be no need for heavy fortifications on a fortress that shouldn't even be here.",0);
		}
		add_dialog_str(3,"Regardless of the reason, the doors are open.",0);
		add_dialog_choice(0,"The final fight is inside...");
		bmessage = run_dialog(1);

		set_flag(15,1,1);
	}

break;

